package com.ykh.mybbsdemo.util;

import com.ykh.mybbsdemo.constant.VideoConstant;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-10-28
 * Time: 18:54
 */
public class TimeUtil {

    public static String getDateTimeAsString(LocalDateTime localDateTime) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(VideoConstant.DATE_TIME_FORMAT);
        return localDateTime.format(formatter);
    }

}
